package com.io.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * The class/interface
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
@Data
public class StudentInsReq {
    /**
     * 属性描述：姓名
     */
    @ApiModelProperty(value = "姓名", name = "name", example = "guodd")
    private String name;

    /**
     * 属性描述：年龄
     */
    @ApiModelProperty(value = "年龄", name = "age", example = "1")
    @Min(value = 25)
    @Max(value = 50)
    private Integer age;

    @Size(min = 2, max = 10, message = "长度有误")
    private List<@Valid CarList> cars;

}
